package org.tech4j.edi.alarm.api;

import org.tech4j.common.spi.ExtensionLoader;
import org.tech4j.edi.alarm.api.entity.PushModel;

/**
 * @program: tech4j
 * @description:
 * @author: YuKai Fan
 * @create: 2025/3/10 10:02
 **/
public class RetryAlarmServiceFactory {
    private RetryAlarmServiceFactory() {

    }

    public static RetryAlarmService newInstance(final String name) {
        return ExtensionLoader.getExtensionLoader(RetryAlarmService.class).getJoin(name);
    }

    public static void alarm(final String name, final PushModel pushModel) {
        newInstance(name).alarmRetry(pushModel);
    }
}
